package org.example;

import org.example.model.TableLineage;

import java.util.HashMap;
import java.util.Map;

public class FinkConnectorOptionParserWarpper {

    static Map<String,FinkConnectorOptionParser> finkConnectorOptionParserMap;

    static {
        finkConnectorOptionParserMap = new HashMap<>();

        finkConnectorOptionParserMap.put("mysql-cdc",new MysqlCdcFinkConnectorOptionParser());
        finkConnectorOptionParserMap.put("jdbc", new JdbcFinkConnectorOptionParser());

    }


    public static FinkConnectorOptionParser getFlinkConnectorOptionParser(TableLineage tableLineage)
    {
      return   finkConnectorOptionParserMap.get(tableLineage.getOptions().get("connector"));
    }
}
